package com.faner.fast.email.pojo.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * description: EmailConfigDO
 * date: 2020/11/26 11:07
 * author: faner
 */
@ApiModel("邮箱配置类")
@Data
@TableName("tool_email_config")
public class EmailConfigDO extends Model<EmailConfigDO> {

    @TableId
    @ApiModelProperty(value = "ID", hidden = true)
    private Long id;

    @NotBlank(message = "邮件服务器SMTP地址不能为空~")
    @ApiModelProperty(value = "邮件服务器SMTP地址")
    private String host;

    @NotBlank(message = "邮件服务器 SMTP 端口不能为空~")
    @ApiModelProperty(value = "邮件服务器 SMTP 端口")
    private String port;

    @NotBlank(message = "发件者用户名不能为空~")
    @ApiModelProperty(value = "发件者用户名")
    private String user;

    @NotBlank(message = "密码不能为空~")
    @ApiModelProperty(value = "密码")
    private String pass;

    @NotBlank(message = "收件人不能为空~")
    @ApiModelProperty(value = "收件人")
    private String fromUser;
}
